<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/account/user.css"/>
    <link rel="stylesheet" type="text/css" href="css/address/address.css"/>
    <script type="text/javascript" src="js/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/underscore-min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/vue/vue.js"></script>
    <script src="cordova.js"></script>

    <script type="text/javascript" src="js/magiclamp.js?ver=2.0.3" charset="utf-8"></script>
    <script src="js/user_address.js"></script>

</head>
<body>
<div id="user_address_html">
    <header>
        <a @click="page_back" v-if="baseConfig.is_phone" class="h-left back-btn">
            <i class="iconfont icon-fanhui"></i>
        </a>
        <h1 class="h-title">地址管理 </h1>
    </header>
    <div id="root" class="h-t-bar">
        <!--用户操作列表-->
        <div class="add-list" v-for="address in address_list" v-if="address.is_active">
            <div @click="choice_address(payorder_id, address.id)">
                <div class="address-content border-top">
                    <div>{{address.receiver_name}}</div>
                    <div>{{address.receiver_phone}}</div>
                </div>
                <div class="address-content text border-top">
                    {{address.display_name}}
                </div>
            </div>
            <div class="address-content border-top">
                <div class="red-font">
                    <input type="radio" v-model="default_address" :value="address.id"
                           @change="update_default_address(default_address)">设置默认
                </div>
                <div class="right">
                    <div class="btn" @click="modefy_address(address.id)">修改</div>
                    <div class="btn" @click="delete_address(address)">删除</div>
                </div>
            </div>
        </div>
        <div class="list-button">
            <button type="button" @click="create_address">新建地址</button>
        </div>
    </div>
</div>
</body>
</html>